<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" href="<%=request.getContextPath() %>/css/bootstrap.min.css"> 
    </head>
    <body>
    	<div id="main" class="container">
    		<div class="row">
    			<div class="col-lg-6 col-sm-6 col-md-6">
    				<form action="${user==null?'/user/submit':'/user/update' }" method="post">
    				
    				<input type="hidden" name="user.id" value="${user.id }">
    				
    					<div class="form-group">
    						<label>姓名</label>
    						<input type="text" name="user.name" value="${user.name }" class="form-control" placeholder="请输入姓名"/>
    					</div>
    					<div class="form-group">
    						<label>年龄</label>
    						<input type="text" name="user.age" value="${user.age }" class="form-control" placeholder="请输入年龄"/>
    					</div>
    					<div class="form-group">
    						<label>性别</label>
    						<input type="radio" name="user.sex"  <c:if test="${user != null && user.sex == 1 }" > checked="checked" </c:if> value="1"  />男
    						<input type="radio" name="user.sex"  <c:if test="${user != null && user.sex == 2 }" > checked="checked" </c:if> value="2"  />女
    					</div>
    					<div class="form-group">
    						<label>备注信息</label>
    						<textarea name="user.remark"  style="height: 70px;" class="form-control" placeholder="请输入备注信息">${user.remark }</textarea>
    					</div>
    					<div style="text-align: center;">
    						<button type="submit" class="btn btn-primary" >提交</button>
    					</div>
    				</form>
    			</div>
    		</div>
    		
    	</div>
    	
 	</body>
</html>